//
//  UIButton+Fill.m
//  us
//
//  Created by lhx on 2025/4/3.
//

#import "UIButton+Fill.h"

@implementation UIButton (Fill)


+ (UIButton *)us_fillButtonWithTitle:(NSString *)title{
    
    UIButton *button = [UIButton buttonWithType:UIButtonTypeCustom];
    [button setTitle:title forState:UIControlStateNormal];
    [button setBackgroundImage:[UIImage jk_imageWithColor:UIColor.titleColor] forState:UIControlStateNormal];
    [button setBackgroundImage:[UIImage jk_imageWithColor:[UIColor jk_colorWithHex:0x5C5C5C]] forState:UIControlStateDisabled];
    [button.titleLabel setFont:[UIFont systemFontOfSize:16]];
    [button setTitleColor:[UIColor whiteColor] forState:0];
    button.layer.cornerRadius = 16;
    
    button.clipsToBounds = YES;
    return button;
}

+ (UIButton *)us_borderButtonWithTitle:(NSString *)title{
    UIButton *button = [UIButton buttonWithType:UIButtonTypeCustom];
    [button setTitle:title forState:UIControlStateNormal];
    [button.titleLabel setFont:[UIFont systemFontOfSize:16]];
    button.layer.cornerRadius = 16;
    button.layer.borderWidth = 1.2f;
    button.layer.borderColor = UIColor.lightGrayColor.CGColor;
    [button setTitleColor:UIColor.lightGrayColor forState:0];
    return button;
}


+ (CGFloat)us_buttonDefaultHeight{
    return 56;
}

@end
